/*
 * Eliminar.java
 *
 * Created on 31 de marzo de 2009, 16:41
 */

package finaltsb.GUI;

/**
 *
 * @author  ANA
 */
public class Eliminar extends javax.swing.JFrame {
    
    /** Creates new form Eliminar */
    public Eliminar() {
        initComponents();
        
        this.setDefaultCloseOperation(Principal.DISPOSE_ON_CLOSE);
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jpEliminar = new javax.swing.JPanel();
        jlbElimiarPal = new javax.swing.JLabel();
        jtxtElimarPal = new javax.swing.JTextField();
        jbtnEliminar = new javax.swing.JButton();
        jbtnElCancelar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(finaltsb.FinalTSBApp.class).getContext().getResourceMap(Eliminar.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setIconImages(null);
        setName("Form"); // NOI18N
        setResizable(false);

        jpEliminar.setName("jpEliminar"); // NOI18N

        jlbElimiarPal.setText(resourceMap.getString("jlbElimiarPal.text")); // NOI18N
        jlbElimiarPal.setName("jlbElimiarPal"); // NOI18N

        jtxtElimarPal.setText(resourceMap.getString("text")); // NOI18N
        jtxtElimarPal.setName(""); // NOI18N
        jtxtElimarPal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtxtElimarPalActionPerformed(evt);
            }
        });

        jbtnEliminar.setIcon(resourceMap.getIcon("jbtnEliminar.icon")); // NOI18N
        jbtnEliminar.setText(resourceMap.getString("jbtnEliminar.text")); // NOI18N
        jbtnEliminar.setName("jbtnEliminar"); // NOI18N
        jbtnEliminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtnEliminarActionPerformed(evt);
            }
        });

        jbtnElCancelar.setIcon(resourceMap.getIcon("jbtnElCancelar.icon")); // NOI18N
        jbtnElCancelar.setText(resourceMap.getString("jbtnElCancelar.text")); // NOI18N
        jbtnElCancelar.setName("jbtnElCancelar"); // NOI18N
        jbtnElCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtnElCancelarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpEliminarLayout = new javax.swing.GroupLayout(jpEliminar);
        jpEliminar.setLayout(jpEliminarLayout);
        jpEliminarLayout.setHorizontalGroup(
            jpEliminarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpEliminarLayout.createSequentialGroup()
                .addGroup(jpEliminarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpEliminarLayout.createSequentialGroup()
                        .addGap(37, 37, 37)
                        .addComponent(jlbElimiarPal, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jtxtElimarPal, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jpEliminarLayout.createSequentialGroup()
                        .addGap(69, 69, 69)
                        .addComponent(jbtnEliminar, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jbtnElCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(81, Short.MAX_VALUE))
        );
        jpEliminarLayout.setVerticalGroup(
            jpEliminarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpEliminarLayout.createSequentialGroup()
                .addGap(31, 31, 31)
                .addGroup(jpEliminarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtxtElimarPal, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jlbElimiarPal, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(108, 108, 108)
                .addGroup(jpEliminarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jbtnEliminar, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbtnElCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(36, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jpEliminar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jpEliminar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jtxtElimarPalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtxtElimarPalActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtxtElimarPalActionPerformed

    private void jbtnEliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnEliminarActionPerformed
       /**
       * Primero hace una búsqueda a ver si encuentra la palabra (llamar al 
        * mètodo buscar)
        *si no la encuentra po up: no se encontro palabra, ingrese otra palabra
        * si se encuentra: pop up: esta seguro q desea eliminar?
        * y recién dpues de aceptar ese pop-up: se elimina la palabra  
        * (se llama al método eliminar)
        * y pop up: la palabra se elimino exitosamente
       */
               
        // TODO add your handling code here:
    }//GEN-LAST:event_jbtnEliminarActionPerformed

    private void jbtnElCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnElCancelarActionPerformed
           this.dispose();
        // TODO add your handling code here:
    }//GEN-LAST:event_jbtnElCancelarActionPerformed
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Eliminar().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jbtnElCancelar;
    private javax.swing.JButton jbtnEliminar;
    private javax.swing.JLabel jlbElimiarPal;
    private javax.swing.JPanel jpEliminar;
    private javax.swing.JTextField jtxtElimarPal;
    // End of variables declaration//GEN-END:variables
    
}
